/*
 *  Copyright (C) 2009  Peter Kist & Jan Ripke
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/** \file
* This file contains the interface to the mediator and generic details of the logic module
*/

#ifndef __logic_mediator_types_h
#define __logic_mediator_types_h 1

#include <string>

#include <Core/Mediator/Interface.h>
#include <Core/Mediator/Event.h>
#include <Core/Mediator/Request.h>

/** \def MODULE_TYPE_LOGIC_SET_STATE
 * set (or change) the game's state
 */
#define MODULE_TYPE_LOGIC_SET_STATE 1


namespace galaxy {
    namespace logic {

        /** The State interface. The interface contains constants with the \b Name of the states */
        class State {
        public:
            /** the name of a state */
            typedef std::string const Name;

            static Name c_MainMenu;     /**< main menu state identifier */
            static Name c_Exit;         /**< exit state identifier */
            static Name c_Settings;     /**< settings state identifier */
            static Name c_Credits;      /**< credits state identifier */
            static Name c_SinglePlayer; /**< multiplayer state identifier */
            static Name c_MultiPlayer;  /**< single player state identifier */
            static Name c_ServerSelect; /**< server select state identifier */
        };

        /** logic Request object that tells state system to setup initial state */
        class StateRequest: public mediator::Request {
        public:

            State::Name m_StateName;

            StateRequest(int type, State::Name& stateName) 
                : mediator::Request (mediator::CATEGORY_LOGIC, type, 
                mediator::Identifier::none), m_StateName (stateName) 
            { };

        };


    } // namespace logic
} // namespace galaxy

#endif // __logic_mediator_types_h
